package com.slimbloody.interfaces;

import static io.grpc.MethodDescriptor.generateFullMethodName;

/**
 */
@javax.annotation.Generated(
    value = "by gRPC proto compiler (version 1.35.0)",
    comments = "Source: HelloWorld.proto")
public final class EurekaServiceGrpc {

  private EurekaServiceGrpc() {}

  public static final String SERVICE_NAME = "com.slimbloody.EurekaService";

  // Static method descriptors that strictly reflect the proto.
  private static volatile io.grpc.MethodDescriptor<com.slimbloody.interfaces.HelloRequest,
      com.slimbloody.interfaces.HelloReply> getSayHelloMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "SayHello",
      requestType = com.slimbloody.interfaces.HelloRequest.class,
      responseType = com.slimbloody.interfaces.HelloReply.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor<com.slimbloody.interfaces.HelloRequest,
      com.slimbloody.interfaces.HelloReply> getSayHelloMethod() {
    io.grpc.MethodDescriptor<com.slimbloody.interfaces.HelloRequest, com.slimbloody.interfaces.HelloReply> getSayHelloMethod;
    if ((getSayHelloMethod = EurekaServiceGrpc.getSayHelloMethod) == null) {
      synchronized (EurekaServiceGrpc.class) {
        if ((getSayHelloMethod = EurekaServiceGrpc.getSayHelloMethod) == null) {
          EurekaServiceGrpc.getSayHelloMethod = getSayHelloMethod =
              io.grpc.MethodDescriptor.<com.slimbloody.interfaces.HelloRequest, com.slimbloody.interfaces.HelloReply>newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SayHello"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.slimbloody.interfaces.HelloRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.slimbloody.interfaces.HelloReply.getDefaultInstance()))
              .setSchemaDescriptor(new EurekaServiceMethodDescriptorSupplier("SayHello"))
              .build();
        }
      }
    }
    return getSayHelloMethod;
  }

  /**
   * Creates a new async stub that supports all call types for the service
   */
  public static EurekaServiceStub newStub(io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory<EurekaServiceStub> factory =
      new io.grpc.stub.AbstractStub.StubFactory<EurekaServiceStub>() {
        @java.lang.Override
        public EurekaServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new EurekaServiceStub(channel, callOptions);
        }
      };
    return EurekaServiceStub.newStub(factory, channel);
  }

  /**
   * Creates a new blocking-style stub that supports unary and streaming output calls on the service
   */
  public static EurekaServiceBlockingStub newBlockingStub(
      io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory<EurekaServiceBlockingStub> factory =
      new io.grpc.stub.AbstractStub.StubFactory<EurekaServiceBlockingStub>() {
        @java.lang.Override
        public EurekaServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new EurekaServiceBlockingStub(channel, callOptions);
        }
      };
    return EurekaServiceBlockingStub.newStub(factory, channel);
  }

  /**
   * Creates a new ListenableFuture-style stub that supports unary calls on the service
   */
  public static EurekaServiceFutureStub newFutureStub(
      io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory<EurekaServiceFutureStub> factory =
      new io.grpc.stub.AbstractStub.StubFactory<EurekaServiceFutureStub>() {
        @java.lang.Override
        public EurekaServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new EurekaServiceFutureStub(channel, callOptions);
        }
      };
    return EurekaServiceFutureStub.newStub(factory, channel);
  }

  /**
   */
  public static abstract class EurekaServiceImplBase implements io.grpc.BindableService {

    /**
     * <pre>
     * Sends a greeting
     * </pre>
     */
    public void sayHello(com.slimbloody.interfaces.HelloRequest request,
        io.grpc.stub.StreamObserver<com.slimbloody.interfaces.HelloReply> responseObserver) {
      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSayHelloMethod(), responseObserver);
    }

    @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
      return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
          .addMethod(
            getSayHelloMethod(),
            io.grpc.stub.ServerCalls.asyncUnaryCall(
              new MethodHandlers<
                com.slimbloody.interfaces.HelloRequest,
                com.slimbloody.interfaces.HelloReply>(
                  this, METHODID_SAY_HELLO)))
          .build();
    }
  }

  /**
   */
  public static final class EurekaServiceStub extends io.grpc.stub.AbstractAsyncStub<EurekaServiceStub> {
    private EurekaServiceStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected EurekaServiceStub build(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      return new EurekaServiceStub(channel, callOptions);
    }

    /**
     * <pre>
     * Sends a greeting
     * </pre>
     */
    public void sayHello(com.slimbloody.interfaces.HelloRequest request,
        io.grpc.stub.StreamObserver<com.slimbloody.interfaces.HelloReply> responseObserver) {
      io.grpc.stub.ClientCalls.asyncUnaryCall(
          getChannel().newCall(getSayHelloMethod(), getCallOptions()), request, responseObserver);
    }
  }

  /**
   */
  public static final class EurekaServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub<EurekaServiceBlockingStub> {
    private EurekaServiceBlockingStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected EurekaServiceBlockingStub build(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      return new EurekaServiceBlockingStub(channel, callOptions);
    }

    /**
     * <pre>
     * Sends a greeting
     * </pre>
     */
    public com.slimbloody.interfaces.HelloReply sayHello(com.slimbloody.interfaces.HelloRequest request) {
      return io.grpc.stub.ClientCalls.blockingUnaryCall(
          getChannel(), getSayHelloMethod(), getCallOptions(), request);
    }
  }

  /**
   */
  public static final class EurekaServiceFutureStub extends io.grpc.stub.AbstractFutureStub<EurekaServiceFutureStub> {
    private EurekaServiceFutureStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected EurekaServiceFutureStub build(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      return new EurekaServiceFutureStub(channel, callOptions);
    }

    /**
     * <pre>
     * Sends a greeting
     * </pre>
     */
    public com.google.common.util.concurrent.ListenableFuture<com.slimbloody.interfaces.HelloReply> sayHello(
        com.slimbloody.interfaces.HelloRequest request) {
      return io.grpc.stub.ClientCalls.futureUnaryCall(
          getChannel().newCall(getSayHelloMethod(), getCallOptions()), request);
    }
  }

  private static final int METHODID_SAY_HELLO = 0;

  private static final class MethodHandlers<Req, Resp> implements
      io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
      io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
      io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
      io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
    private final EurekaServiceImplBase serviceImpl;
    private final int methodId;

    MethodHandlers(EurekaServiceImplBase serviceImpl, int methodId) {
      this.serviceImpl = serviceImpl;
      this.methodId = methodId;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("unchecked")
    public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) {
      switch (methodId) {
        case METHODID_SAY_HELLO:
          serviceImpl.sayHello((com.slimbloody.interfaces.HelloRequest) request,
              (io.grpc.stub.StreamObserver<com.slimbloody.interfaces.HelloReply>) responseObserver);
          break;
        default:
          throw new AssertionError();
      }
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("unchecked")
    public io.grpc.stub.StreamObserver<Req> invoke(
        io.grpc.stub.StreamObserver<Resp> responseObserver) {
      switch (methodId) {
        default:
          throw new AssertionError();
      }
    }
  }

  private static abstract class EurekaServiceBaseDescriptorSupplier
      implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
    EurekaServiceBaseDescriptorSupplier() {}

    @java.lang.Override
    public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
      return com.slimbloody.interfaces.HelloWorldProto.getDescriptor();
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
      return getFileDescriptor().findServiceByName("EurekaService");
    }
  }

  private static final class EurekaServiceFileDescriptorSupplier
      extends EurekaServiceBaseDescriptorSupplier {
    EurekaServiceFileDescriptorSupplier() {}
  }

  private static final class EurekaServiceMethodDescriptorSupplier
      extends EurekaServiceBaseDescriptorSupplier
      implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
    private final String methodName;

    EurekaServiceMethodDescriptorSupplier(String methodName) {
      this.methodName = methodName;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() {
      return getServiceDescriptor().findMethodByName(methodName);
    }
  }

  private static volatile io.grpc.ServiceDescriptor serviceDescriptor;

  public static io.grpc.ServiceDescriptor getServiceDescriptor() {
    io.grpc.ServiceDescriptor result = serviceDescriptor;
    if (result == null) {
      synchronized (EurekaServiceGrpc.class) {
        result = serviceDescriptor;
        if (result == null) {
          serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
              .setSchemaDescriptor(new EurekaServiceFileDescriptorSupplier())
              .addMethod(getSayHelloMethod())
              .build();
        }
      }
    }
    return result;
  }
}
